package com.ys.entity.business;

import javax.persistence.Table;


import java.util.Date;

import com.ys.entity.base.BaseEntity;

/**
*/
@Table(name="`tb_process_instance`", catalog="id")
public class TbProcessInstance extends BaseEntity<TbProcessInstance> {

	private Long id; // 主键ID
	private String title; // 流程标题
	private String procInstId; // 流程实例ID
	private String procInstState; // 流程实例状态，见ENUM
	private String procDefKey; // 流程定义KEY
	private String procDefName; // 流程定义名称
	private String procDeployId; // 流程部署ID
	private String taskIdPrev; // 上一个任务ID
	private String taskIdNext; // 下一个任务ID
	private Long relativeId; // 相关联的ID
	private Integer status; // 
	private Date createTime; // 
	private Date updateTime; // 

	public Long getId() {
		return id;
	}
	public TbProcessInstance setId(Long id) {
		this.id = id;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public TbProcessInstance setTitle(String title) {
		this.title = title;
		return this;
	}
	public String getProcInstId() {
		return procInstId;
	}
	public TbProcessInstance setProcInstId(String procInstId) {
		this.procInstId = procInstId;
		return this;
	}
	public String getProcInstState() {
		return procInstState;
	}
	public TbProcessInstance setProcInstState(String procInstState) {
		this.procInstState = procInstState;
		return this;
	}
	public String getProcDefKey() {
		return procDefKey;
	}
	public TbProcessInstance setProcDefKey(String procDefKey) {
		this.procDefKey = procDefKey;
		return this;
	}
	public String getProcDefName() {
		return procDefName;
	}
	public TbProcessInstance setProcDefName(String procDefName) {
		this.procDefName = procDefName;
		return this;
	}
	public String getProcDeployId() {
		return procDeployId;
	}
	public TbProcessInstance setProcDeployId(String procDeployId) {
		this.procDeployId = procDeployId;
		return this;
	}
	public String getTaskIdPrev() {
		return taskIdPrev;
	}
	public TbProcessInstance setTaskIdPrev(String taskIdPrev) {
		this.taskIdPrev = taskIdPrev;
		return this;
	}
	public String getTaskIdNext() {
		return taskIdNext;
	}
	public TbProcessInstance setTaskIdNext(String taskIdNext) {
		this.taskIdNext = taskIdNext;
		return this;
	}
	public Long getRelativeId() {
		return relativeId;
	}
	public TbProcessInstance setRelativeId(Long relativeId) {
		this.relativeId = relativeId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TbProcessInstance setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TbProcessInstance setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TbProcessInstance setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TbProcessInstance tbProcessInstance(
		String title,
		String procInstId,
		String procInstState,
		String procDefKey,
		String procDefName,
		String procDeployId,
		String taskIdPrev,
		String taskIdNext,
		Long relativeId,
		Integer status
			) {
		TbProcessInstance entity = new TbProcessInstance();
		entity.setTitle(title);
		entity.setProcInstId(procInstId);
		entity.setProcInstState(procInstState);
		entity.setProcDefKey(procDefKey);
		entity.setProcDefName(procDefName);
		entity.setProcDeployId(procDeployId);
		entity.setTaskIdPrev(taskIdPrev);
		entity.setTaskIdNext(taskIdNext);
		entity.setRelativeId(relativeId);
		entity.setStatus(status);
		return entity;
	}
}